<?php

use Faker\Generator as Faker;

$factory->define(App\Models\ArticleModel::class, function (Faker $faker) {
    return [
        'title'=>$faker->sentence(8),
        'source'=>'北京',
        'author'=>'daoheng',
        'description'=>$faker->sentence(10),
        'thumb'=>$faker->imageUrl(100,100),
        'category_id'=>array_random([1,2,3,4]),
        //创建文章的用户id
        'user_id'=>array_random(range(1,20)),
        'content'=>$faker->text,
    ];
});
